<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="css/mui.loading.css" />
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<h1 class="mui-title">window1</h1>
		</header>

		<nav class="mui-bar mui-bar-tab">
			<a class="mui-tab-item mui-active">
				<span class="mui-icon mui-icon-home"></span>
				<span class="mui-tab-label">首页</span>
			</a>
			<a class="mui-tab-item">
				<span class="mui-icon mui-icon-phone"></span>
				<span class="mui-tab-label">电话</span>
			</a>
			<a class="mui-tab-item">
				<span class="mui-icon mui-icon-email"></span>
				<span class="mui-tab-label">邮件</span>
			</a>
			<a class="mui-tab-item">
				<span class="mui-icon mui-icon-gear"></span>
				<span class="mui-tab-label">设置</span>
			</a>
		</nav>
		<div class="mui-page-content">
			<div class="mui-scroll-wrapper">
				<div id="pjax-container" class="mui-scroll" style="transform: translate3d(0px, 0px, 0px) translateZ(0px);">
					<button id='openwindow1' type="button" class="mui-btn mui-btn-block mui-btn-danger">openWindow1</button>
					<a id='openwindow2' data-pjax href="window2.html" class="mui-btn mui-btn-block mui-btn-danger">openWindow2</a>
					<a id='openwindow3' data-pjax href="window3.html" class="mui-btn mui-btn-block mui-btn-danger">openWindow3</a>
				</div>
			</div>
		</div>
		


		<script src="js/mui.min.js"></script>
		<script type="text/javascript" src="js/mui.loading.js"></script>
		<script type="text/javascript" src="js/jquery-1.12.js"></script>
		<script type="text/javascript" src="js/jquery.pjax.js"></script>
		<script type="text/javascript">
			mui.init({
				statusBarBackground: '#f7f7f7'
			});

			mui('.mui-scroll-wrapper').scroll({
				deceleration: 0.0005 //flick 减速系数，系数越大，滚动速度越慢，滚动距离越小，默认值0.0006
			});

			document.getElementById('openwindow1').addEventListener('tap', function() {

				mui.openWindow({
					url: 'window2.html',
					show: {
						autoShow: false
					}
				});
			});

			$(function() {

				$(document).pjax('a[data-pjax]', '#pjax-container');

				$(document).on('pjax:send', function() {
					mui.showLoading('加载中...');
				});
				$(document).on('pjax:complete', function(xhr, textStatus, options) {
					setTimeout(function() {
						mui.hideLoading();
					}, 1000);
				});

			});
		</script>
	</body>

</html>
